The method collects the children of subdirectories, regardless of
the children's file types.
It is therefore odd to return files as `dir`, in particular as the
method is indeed used to collect plain files (session modes and
search providers) as well as directories (installed extensions and
extension updates).
Change the returned objects to return files as `file`, which
works for both regular files and directories.